﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Happy.Application.Query
{
    /// <summary>
    /// 客户端传递的排序条件。
    /// </summary>
    public sealed class Sorter
    {
        /// <summary>
        /// 属性。
        /// </summary>
        public string Property { get; set; }

        /// <summary>
        /// 排序方向。
        /// </summary>
        public SorterDirection Direction { get; set; }

        internal string ToSorterClause()
        {
            return string.Format("{0} {1}", this.Property, this.Direction);
        }
    }
}
